<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head th:include="common/head::head"></head>

<body>
<div th:include="common/nav::nav" class="tabs"></div>

<div class="content">
    <form th:action="@{/stream/start}" method="post">
        <table>
            <tr>
                <td>
                    <input name="rtsp" required="required" placeholder="rtsp">
                </td>
                <td>
                    rtsp://admin:a00000000@192.168.1.85:554/h264/ch1/sub/av_stream
                </td>
            </tr>
            <tr>
                <td>
                    <input name="streamId" required="required" placeholder="streamId">
                </td>
                <td>cam85( /cam85 = path )</td>
            </tr>
            <tr>
                <td>
                    <input name="transType" placeholder="transType">
                </td>
                <td>TCP,UDP (default TCP)</td>
            </tr>
            <tr>
                <td>
                    <input name="idleTimeout" placeholder="idleTimeout">
                </td>
                <td>pull stream time out (s?)</td>
            </tr>
            <tr>
                <td>
                    <input name="heartbeatInterval" placeholder="heartbeatInterval">
                </td>
                <td>heart beat (ms)</td>
            </tr>
            <tr>
                <td>
                    <button type="submit">start</button>
                </td>
                <td>
                </td>
            </tr>
        </table>
    </form>
</div>

<div class="content">
    <table>
        <tr>
            <th>id</th>
            <th>path</th>
            <th>transType</th>
            <th>inBytes</th>
            <th>outBytes</th>
            <th>startAt</th>
            <th>onlines</th>
            <th>stop</th>
        </tr>
        <tr th:each="pusher : ${pushers}">
            <td th:text="${pusher.id}"></td>
            <td th:text="${pusher.path}"></td>
            <td th:text="${pusher.transType}"></td>
            <td th:text="${pusher.inBytes}"></td>
            <td th:text="${pusher.outBytes}"></td>
            <td th:text="${pusher.startAt}"></td>
            <td th:text="${pusher.onlines}"></td>
            <td>
                <form th:action="@{/stream/stop}" method="post">
                    <input name="id" type="hidden" th:value="${pusher.id}">
                    <button>stop</button>
                </form>
            </td>
        </tr>
    </table>
</div>

</body>

</html>